import { PageParams } from '@/api/model/pageParams';
import { request } from '@/utils/request';

const pageApi = async (params: PageParams) => {
  return request.post({
    url: '/efficacy/page',
    data: params,
  });
};

const insertApi = async (data: any) => {
  return request.post({
    url: '/efficacy/insert',
    data,
  });
};

const updateApi = async (data: any) => {
  return request.post({
    url: '/efficacy/update',
    data,
  });
};

const deleteApi = async (id: string) => {
  return request.get({
    url: `/efficacy/delete/${id}`,
  });
};

export { deleteApi, insertApi, pageApi, updateApi };
